#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>

void changeup(char* ch,int len)
{
	char* cut = ch;
	int count = 0;
	while (*cut)
	{
		if (' ' == *cut)  count++;
		cut++;
	}

	int end1 = len-1;
	int end2 = len - 1 + count * 2;

	while (end1 != end2)
	{ 
		if (' ' != ch[end1])
		{
			ch[end2--] = ch[end1--];
		}
		else
		{
			end1--;
			ch[end2--] = '0';
			ch[end2--] = '2';
			ch[end2--] = '%';

		}
	}
}

int main()
{
	char ch[] = "RRRRRRoge Austine";
	changeup(ch,sizeof(ch));
	printf("%s\n", ch);
	return 0;
}